package dom.domain;

import java.util.ArrayList;
import java.util.Map;

/**
 * Mobileadmistrator entity. @author MyEclipse Persistence Tools
 */

public class Mobileadmistrator implements java.io.Serializable {
	// Fields
	private String adminId;
	private String adminPsd;
	private String epname;
	// Constructors
	/** default constructor */
	public Mobileadmistrator() {
	}
	/** full constructor */
	public Mobileadmistrator(String adminId, String adminPsd, String epname) {
		this.adminId = adminId;
		this.adminPsd = adminPsd;
		this.epname = epname;
	}

	// Property accessors

	public String getAdminId() {
		return this.adminId;
	}

	public void setAdminId(String adminId) {
		this.adminId = adminId;
	}

	public String getAdminPsd() {
		return this.adminPsd;
	}

	public void setAdminPsd(String adminPsd) {
		this.adminPsd = adminPsd;
	}

	public String getEpname() {
		return this.epname;
	}

	public void setEpname(String epname) {
		this.epname = epname;
	}

	@Override
	public String toString() {
		return "{adminId:'" + adminId + "', adminPsd:'" + adminPsd
				+ "', epname:'" + epname + "'}";
	}
	public void setInfo(ArrayList<String> Info,Map<String,String> mAdminInfo)
	{
//		String[] title = Info.split("#")
//		String[] value = adminInfo.split("#");
		for(int i=0;i<Info.size();i++)
		{
			if(Info.get(i).equals("adminId"))
			{
				this.setAdminId(mAdminInfo.get(Info.get(i)));
			}
			if(Info.get(i).equals("adminPsd"))
			{
				this.setAdminPsd(mAdminInfo.get(Info.get(i)));
			}
			if(Info.get(i).equals("epname"))
			{
				this.setEpname(mAdminInfo.get(Info.get(i)));
			}
		}
	}
	
	public ArrayList<String> getInfo(String Info)
	{
		ArrayList<String> list = new ArrayList<String>();
		String[] title = Info.split("#");
		for(int i=0;i<title.length;i++)
		{

			if(title[i].equals("adminId"))
			{
				list.add(this.getAdminId());
			}
			if(title[i].equals("adminPsd"))
			{
				list.add(this.getAdminPsd());
			}
			if(title[i].equals("epname"))
			{
				list.add(this.getEpname());
			}
		
		}
		return list;
	}

}